//
//  ViewController.swift
//  LunalerApp
//
//  Created by 露乐ios on 2018/2/5.
//  Copyright © 2018年 露乐ios. All rights reserved.
//

import UIKit

fileprivate extension Selector
{
    static let testButtonClickAction = #selector(ViewController.testSelector);
}

class ViewController: UIViewController {

   lazy var testButton : UIButton = {
    let tempButton = UIButton()
    tempButton.frame = CGRect.init(x: 100, y: 100, width: 100, height: 30)
    tempButton.backgroundColor = rgba(r: 0x33, g: 0x33, b: 0x33, a: 1.0)
    tempButton.addTarget(self, action: .testButtonClickAction, for: .touchUpInside)
    return tempButton
    }()
    
    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
        self.view.backgroundColor = rgba(r: 0xff, g: 0xff, b: 0xff, a: 1.0)
        
        self.view.addSubview(self.testButton);
    }
    
    
    @objc func testSelector(btn:UIButton) {
        print("testSelector:\(btn)");
    }
    
    
    
    
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }


}

